<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="sp" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="/jsp/jstl/fmt"%>
<%@ taglib prefix="ab" uri="/archerdu/commons"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><sp:message code="admin.manage.title" />-<sp:message code="admin.user.page.title" /></title>
<link href="/css/reset.css" rel="stylesheet" type="text/css" />
<link href="/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <a href="/admin/product/add.dhtml?product.catalogId=<c:out value="${product.catalogId }" />" class="button01">添加文章</a>
  <div id="jpage">
    <ab:page url="/admin/product/page.dhtml" page="${page}" />
  </div>
  <sp:message code="${message.info }" text=""/>
  <table id="table_adv" class="admin_table">
    <tr>
      <th width="100">标题</th>
      <th width="100">作者</th>
      <th width="100">点击</th>
      <th width="130">创建时间</th>
      <th width="120">编辑</th>
    </tr>
    <c:forEach var="s" items="${page.list}" varStatus="status">

      <tr class="${status.index % 2 == 1 ? 'odd':'even' }">
        <td><a href="/admin/product/edit.dhtml?product.id=${s.id }"> <c:out value="${s.title }" />
        </a></td>
        <td><c:out value="${s.author }" /></td>
        <td><c:out value="${s.click }" /></td>
        <td><fmt:formatDate value="${s.createtime }" pattern="yyyy-MM-dd hh:mm:ss" /></td>
        <td><a href="/admin/product/edit.dhtml?product.id=${s.id }"> 修改 </a> <a id="adv_delete"
          href="/admin/product/remove.dhtml?product.id=${s.id }&product.catalogId=${s.catalogId }&pageNo=${page.pageNo}&pageSize=${page.pageSize}" onclick="return confirm('是否删除文章');"> 删除 </a></td>
      </tr>
    </c:forEach>
  </table>
</body>
</html>